using ProjectBase.Core.PersistenceSupport;

namespace Kym.Testing
{
    public static class PersistentObjectExtensions
    {
        public static T WithId<T, V>(this T instance, V id) where T : PersistentObjectWithTypedId<V>
        {
            typeof(T).GetProperty("ID").SetValue(instance, id, null);

            return instance;
        }
    }
}